Ext.define('Admin.view.transfer.TransferGridPanel', {
    extend: 'Ext.grid.Panel',
    xtype: 'transferGridPanel',
    id:'transferGridPanel',
    	
    requires: [
    	//'Ext.grid.column.RowNumberer',
        'Ext.form.field.Date', 
    	'Ext.selection.CheckboxModel'
    ],
    title: '调动信息',
    //store: Ext.data.StoreManager.lookup('simpsonsStore'),
	bind: '{transferDataList}',
 	selModel: {
		selType: 'checkboxmodel',
        checkOnly: true,
        showHeaderCheckbox: true
    },
    //multiSelect: true,
     dockedItems: [{
        xtype: 'toolbar',
        items: [{
            xtype: 'textfield',
            fieldLabel: '名字:',
            name:'empName',
            reference: 'employeeSearchEmpName'
        },'-',{
        xtype: 'datefield',
        fieldLabel: '起始时间',
        name:'startTime',
        format: 'Y/m/d',
        reference: 'employeeSearchStartTime'
    },'-',{
        xtype: 'datefield',
        fieldLabel: '结束时间',
        name:'endTime',
        format: 'Y/m/d',
        reference: 'employeeSearchEndTime'
    },{
            text:'快捷查询',
            tooltip:'快捷查询',
            iconCls:'x-fa fa-search',
            handler : 'search'
        }]
    }],
    columns: [
    		//{xtype: 'rownumberer',width: 40, sortable: false},
    		{
            xtype: 'actioncolumn',
            items: [{
                xtype: 'button',
                iconCls: 'x-fa fa-trash',
                handler : 'deleteTransfer'
            }],
            cls: 'content-column',
            width: 120,
            //dataIndex: 'bool',
            text: '操作',
            tooltip: '操作 '
          },
         
		 { header: 'ID',  dataIndex: 'transferId',hidden:true ,width: 120},
         { header: '姓名',  dataIndex: 'empName' ,width: 120,sortable: false},
         { header: '前职位', dataIndex: 'prePosition',width: 120 ,sortable: false},
		 { header: '现职位', dataIndex: 'nowPosition',width: 120 ,sortable: false},
         { header: '前部门', dataIndex: 'prePart',width: 120 ,sortable: false},
         { header: '现部门', dataIndex: 'nowPart',width: 120 ,sortable: false},
         {header:'调动时间',dataIndex:'transferTime',flex: 1,renderer: Ext.util.Format.dateRenderer('Y/m/d')}
    ],
    columnLines: true,
	bbar: {
	    xtype: 'pagingtoolbar',//注意以后MVVM中使用新写法,不要使用Ext.create()
        //store: Ext.data.StoreManager.lookup('simpsonsStore'),
        bind: '{transferDataList}',
        displayInfo: true,
        displayMsg: 'Displaying topics {0} - {1} of {2}',
        emptyMsg: "No topics to display",
        items:[
            '-', {
            text: '批量删除',
            listeners: {
			    click:'deleteTransfers'
			}
        }]
    }
});